<table class="users list">
  <tr>
    <th>User</th>
    <th>Registered</th>
    <th>Posts</th>
    <th>Last Post</th>
  </tr>
<% for user in @users %>
  <tr class="user">
    <td>
      <%= link_to h(user.name), user_path(user), :class => 'name' %>
      <span class="actions">
        <%= link_to 'edit', edit_user_path(user) if current_user.can_update_user? user %>
      </span>
    </td>
    <td class="registration_date"><%= smart_time_ago_in_words(user.created_at) %></td>
    <td class="post_count"><%= user.posts.count %></td>
    <td class="last_post">
      <% unless user.last_post.nil? %>
        <%= link_to_post user.last_post %>
      <% end %>
    </td>
  </tr>
<% end %>
</table>
